#{extends 'include/base.html' /}
#{set title:'专辑详情' /}
<div class="work_nav">
    <ul>
        <li  class="work_nav_active"><a href="@{Members.work(0)}">我的作品</a></li>
        <li><a href="@{Members.draft(0)}">我的草稿</a></li>
        <li><a href="@{Members.album(0)}">我的专辑</a></li>
        <li><a href="@{Members.addAlbum()}">发布作品</a></li>
    </ul>
</div>
<div class="simple_wrap">
    <ul class="path_nav">
        <li class="path_index"><a href="@{Application.index(0)}">首页</a></li>
        <li>><a href="@{Members.home()}">个人中心</a></li>
        <li>><a href="@{Members.work()}">我的项目</a></li>
        <li>>我的作品</li>
    </ul>

    <ul class="work_main_nav">
        <li><a href="@{Concerns.myTrend(0)}">动态</a></li>
        <li><a href="@{Members.work(0)}">我的作品</a></li>
        <li><a href="@{Concerns.myConcern(0)}">关注</a></li>
        <li><a href="@{Collections.collectWork(0)}">收藏</a></li>
    </ul>
    <div class="clear"></div>
    <div class="album_item_wrap">
        <div class="album_left_wrap">
        <img src="${albumBean.url}" alt=""/>
        </div>
        <div class="album_right_wrap">
            <p class="album_right_title">${albumBean.authorName}</p>
            <p  class="album_right_content">${albumBean.info}</p>
            <p  class="album_right_author">By ${user.nickname?user.nickname:"佚名"}</p>
            <p class="album_collect_btn"><a href="#" class="collect_btn">收藏专辑</a></p>
        </div>
       <div class="clear"></div>
    </div>
    #{if webServiceBean.data.size==0}
        <h3 class="no_content">暂时还没有内容</h3>
    #{/if}
    <ul class=work_wrap>
    #{list items:webServiceBean.data, as:"item"}
        <li><div class="work_img"><a href="@{Application.article(item.id)}"><img src="${item.photoUrl}" alt=""/></a></div><div class="work_info"><h3><a href="@{Application.article(item.id)}">${item.authorName}</a></h3><div>${item.content.raw()}</div><p class="num_work_p"> 评论数<span>${item.commentNum}</span></p></div></li>
    #{/list}
    </ul>
    <div class="clear"></div>
    #{page1 pageBean: pageBean, params : params/}



</div>
<script type="text/javascript">
    /**
     * 收藏
     */
    $(".collect_btn").click(function (event) {
        event.preventDefault();
        var data={};
        data.albumId = "${albumBean.albumId}";
        $.post('@{Api.collectAlbum()}', data, function(res) {
            alert(res.data);
        });
    }) 
</script>